import { request, type RequestOptions } from '@/utils/request'

/** 医院列表 GET /meereen/hospital/list */
export async function hospitalList(params: {}, options?: RequestOptions) {
  return request(`/meereen/hospital/list`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {
      isReturnResult: false
    })
  })
}


/** 新增医院 POST /meereen/hospital */
export async function hospitalAdd(body, options?: RequestOptions) {
  return request(`/meereen/hospital`, {
    method: 'POST',
    data: body,
    ...(options || {
      isReturnResult: true
    })
  })
}


/** 修改医院 PUT /meereen/hospital */
export async function hospitalEdit(body, options?: RequestOptions) {
  return request(`/meereen/hospital`, {
    method: 'PUT',
    data: body,
    ...(options || {
      isReturnResult: false
    })
  })
}


/** 回显医院 GET /meereen/hospital/putList/202312011708380003 */
export async function hospitalEcho(id: string, options?: RequestOptions) {
  return request(`/meereen/hospital/putList/${id}`, {
    method: 'GET',
    ...(options || {
      isReturnResult: true
    })
  })
}


/** 删除医院 DELETE /meereen/hospital/202312011708380003 */
export async function hospitalDelete(id: string, options?: RequestOptions) {
  return request(`/meereen/hospital/${id}`, {
    method: 'DELETE',
    ...(options || {
      isReturnResult: true
    })
  })
}
